import csv
import logging
from logging import config

from faker import Faker

oahost = "http://127.0.0.1:8080"

faker = Faker(locale="zh_CN")

# 加载日志配置文件
config.fileConfig("./resources/config/log.conf")
# 获取日志输出对象
logger = logging.getLogger()



def getCsvData(path):
    # 获取csv文件对象
    with open(path, mode="r", encoding="utf-8") as cases:
        # 读取csv文件
        csvReader = csv.reader(cases)
        # 定义用例列表
        caseList = []
        # 遍历数据
        for index, row in enumerate(csvReader, 1):
            if index > 1:
                caseList.append(row)

    return caseList